package com.road.vast.pojo.system;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.github.dreamyoung.mprelation.InverseJoinColumn;
import com.github.dreamyoung.mprelation.JoinColumn;
import com.github.dreamyoung.mprelation.JoinTable;
import com.github.dreamyoung.mprelation.ManyToMany;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author 郭泽鹏
 * @since 2020-07-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="BsUser对象", description="")
public class BsUser implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "ID")
      @TableId(value = "id", type = IdType.ID_WORKER)
    private String id;

    @ApiModelProperty(value = "手机号码")
    private String mobile;

    @ApiModelProperty(value = "用户名称")
    private String username;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "启用状态 0是禁用，1是启用")
    private Integer enableState;

    @ApiModelProperty(value = "创建时间")
      @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "部门ID")
    private String departmentId;

    @ApiModelProperty(value = "入职时间")
    private Date timeOfEntry;

    @ApiModelProperty(value = "聘用形式")
    private Integer formOfEmployment;

    @ApiModelProperty(value = "工号")
    private String workNumber;

    @ApiModelProperty(value = "管理形式")
    private String formOfManagement;

    @ApiModelProperty(value = "工作城市")
    private String workingCity;

    @ApiModelProperty(value = "转正时间")
    private Date correctionTime;

    @ApiModelProperty(value = "在职状态 1.在职 2.离职")
    private Integer inServiceStatus;

    @ApiModelProperty(value = "企业ID")
    private String companyId;

    private String companyName;

    private String departmentName;

    @TableField(exist = false)
    @ManyToMany
    @JoinColumn(name = "id", referencedColumnName = "user_id")
    @InverseJoinColumn(name = "id", referencedColumnName = "role_id")
    private List<PeRole> peRole;//用户与角色   多对多

}
